//===============================================================================
// XGenPlus Tool
// ==============================================================================
// Please visit http://www.codeplex.com/xgenplus for latest updates.
//
// This source is subject to the GNU General Public License v2.
// 
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace XGenPlus
{
    public class Logger: MarshalByRefObject
    {

        public delegate void MessageListenerDelegate(string message);

        public event MessageListenerDelegate MessageListener;

        public void Write(string s,StreamWriter sw)
        {
            MessageListener.Invoke(s);
            sw.WriteLine(s);
        }


        public void Write(string s)
        {
            MessageListener.Invoke(s);
        }
        
     }
}
